#ifndef VXCOMMANDSCONTROLLER_H
#define VXCOMMANDSCONTROLLER_H

#include <Qt>
#include <QtGui>
#include <QtCore>

class VxCommandsController;

typedef QMap<QGraphicsView*, VxCommandsController*> ViewsMap;

class VxCommandsController : public QObject
{

	Q_OBJECT

public:
	static VxCommandsController * instance(QGraphicsView * view);

	bool active()
	{
		return _active;
	}

protected:
	bool eventFilter(QObject *obj, QEvent *event);

private:
	static ViewsMap * _views;

	VxCommandsController(QGraphicsView * view);

	QGraphicsView * _view;
	bool _active;
	bool _spacePressed;
	bool _spaceCtrlPressed;

signals:
	void cancelAnimation();

	void zoomFitToAll();
	void zoomToBack();

	void beginHandScroll();
	void endHandScroll();

	void zoomByWheel(int);
	void mouseWheel(int);
	void mouseMove(QPoint);
};



#endif // VXCOMMANDSCONTROLLER_H
